.class public Lrexsee/dialog/PopupWindow;
.super Lrexsee/core/widget/DivDialog;
.source "PopupWindow.java"

# interfaces
.implements Lrexsee/core/browser/clazz/BrowserParent;


# instance fields
.field public final mBottomLayout:Landroid/widget/LinearLayout;

.field public final mChild:Lrexsee/core/browser/Browser;

.field public final mClickCallback:Ljava/lang/Runnable;

.field public final mLayout:Landroid/widget/LinearLayout;

.field public final mTopLayout:Landroid/widget/LinearLayout;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Runnable;)V
    .locals 6
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "dialogId"    # Ljava/lang/String;
    .param p3, "url"    # Ljava/lang/String;
    .param p4, "style"    # Ljava/lang/String;
    .param p5, "clickCallback"    # Ljava/lang/Runnable;

    .prologue
    const/4 v5, -0x2

    const/4 v4, 0x1

    const/4 v2, 0x0

    const/4 v3, -0x1

    .line 21
    invoke-direct {p0, p1, p2, p4}, Lrexsee/core/widget/DivDialog;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;Ljava/lang/String;)V

    .line 22
    iput-object p5, p0, Lrexsee/dialog/PopupWindow;->mClickCallback:Ljava/lang/Runnable;

    .line 24
    new-instance v0, Landroid/widget/LinearLayout;

    iget-object v1, p0, Lrexsee/dialog/PopupWindow;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lrexsee/dialog/PopupWindow;->mLayout:Landroid/widget/LinearLayout;

    .line 25
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v4}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 26
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v2}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V

    .line 28
    new-instance v0, Landroid/widget/LinearLayout;

    iget-object v1, p0, Lrexsee/dialog/PopupWindow;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lrexsee/dialog/PopupWindow;->mTopLayout:Landroid/widget/LinearLayout;

    .line 29
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mTopLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v4}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 30
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mTopLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v2}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V

    .line 31
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mTopLayout:Landroid/widget/LinearLayout;

    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v1, v3, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 32
    new-instance v0, Landroid/widget/LinearLayout;

    iget-object v1, p0, Lrexsee/dialog/PopupWindow;->mContext:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lrexsee/dialog/PopupWindow;->mBottomLayout:Landroid/widget/LinearLayout;

    .line 33
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mBottomLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v4}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 34
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mBottomLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v2}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V

    .line 35
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mBottomLayout:Landroid/widget/LinearLayout;

    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v1, v3, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 37
    new-instance v0, Lrexsee/core/browser/Browser;

    iget-object v1, p0, Lrexsee/dialog/PopupWindow;->mContext:Landroid/content/Context;

    iget-object v2, p0, Lrexsee/dialog/PopupWindow;->div:Lrexsee/core/widget/Div;

    invoke-direct {v0, v1, p1, v2, p0}, Lrexsee/core/browser/Browser;-><init>(Landroid/content/Context;Lrexsee/core/browser/Browser;Lrexsee/core/widget/Div;Lrexsee/core/browser/clazz/BrowserParent;)V

    iput-object v0, p0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    .line 38
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    invoke-virtual {v0, p4}, Lrexsee/core/browser/Browser;->setStyle(Ljava/lang/String;)V

    .line 39
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    const/high16 v2, 0x3f800000    # 1.0f

    invoke-direct {v1, v3, v3, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(IIF)V

    invoke-virtual {v0, v1}, Lrexsee/core/browser/Browser;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 41
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mLayout:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lrexsee/dialog/PopupWindow;->mTopLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 42
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mLayout:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 43
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mLayout:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lrexsee/dialog/PopupWindow;->mBottomLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 45
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mLayout:Landroid/widget/LinearLayout;

    invoke-virtual {p0, v0}, Lrexsee/dialog/PopupWindow;->addChild(Landroid/view/View;)V

    .line 46
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lrexsee/dialog/PopupWindow;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V

    .line 47
    if-eqz p3, :cond_0

    invoke-virtual {p3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    const-string v1, ""

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 48
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->function:Lrexsee/core/browser/RexseeBrowser;

    invoke-virtual {v0, p3}, Lrexsee/core/browser/RexseeBrowser;->load(Ljava/lang/String;)V

    .line 51
    :cond_0
    return-void
.end method


# virtual methods
.method public doCancel()V
    .locals 0

    .prologue
    .line 76
    invoke-virtual {p0}, Lrexsee/dialog/PopupWindow;->dismiss()V

    .line 77
    return-void
.end method

.method public freeMemory()V
    .locals 2

    .prologue
    .line 81
    :try_start_0
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    invoke-virtual {v0}, Lrexsee/core/browser/Browser;->freeMemory()V

    .line 82
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lrexsee/core/browser/Browser;->clearCache(Z)V

    .line 83
    invoke-static {}, Ljava/lang/System;->gc()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 86
    :goto_0
    return-void

    .line 84
    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public getBrowser()Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 61
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mChild:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method public getParentId()Ljava/lang/String;
    .locals 1

    .prologue
    .line 66
    invoke-virtual {p0}, Lrexsee/dialog/PopupWindow;->getDialogId()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public isCancelable()Z
    .locals 2

    .prologue
    .line 71
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->styleSheet:Lrexsee/core/style/StyleSheet;

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->window_cancelable:Ljava/lang/String;

    const-string v1, "true"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method protected onClick(Landroid/content/DialogInterface;)V
    .locals 1
    .param p1, "dialog"    # Landroid/content/DialogInterface;

    .prologue
    .line 55
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mClickCallback:Ljava/lang/Runnable;

    if-eqz v0, :cond_0

    .line 56
    iget-object v0, p0, Lrexsee/dialog/PopupWindow;->mClickCallback:Ljava/lang/Runnable;

    invoke-interface {v0}, Ljava/lang/Runnable;->run()V

    .line 58
    :cond_0
    return-void
.end method
